import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { AccountantEvaluateVO, AccountantEvaluateForm, AccountantEvaluateQuery } from '@/api/system/accountantEvaluate/types';

/**
 * 查询技师评论信息列表
 * @param query
 * @returns {*}
 */

export const listAccountantEvaluate = (query?: AccountantEvaluateQuery): AxiosPromise<AccountantEvaluateVO[]> => {
  return request({
    url: '/system/accountantEvaluate/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询技师评论信息详细
 * @param evaluateAccountantId
 */
export const getAccountantEvaluate = (evaluateAccountantId: string | number): AxiosPromise<AccountantEvaluateVO> => {
  return request({
    url: '/system/accountantEvaluate/' + evaluateAccountantId,
    method: 'get'
  });
};

/**
 * 新增技师评论信息
 * @param data
 */
export const addAccountantEvaluate = (data: AccountantEvaluateForm) => {
  return request({
    url: '/system/accountantEvaluate',
    method: 'post',
    data: data
  });
};

/**
 * 修改技师评论信息
 * @param data
 */
export const updateAccountantEvaluate = (data: AccountantEvaluateForm) => {
  return request({
    url: '/system/accountantEvaluate',
    method: 'put',
    data: data
  });
};

/**
 * 删除技师评论信息
 * @param evaluateAccountantId
 */
export const delAccountantEvaluate = (evaluateAccountantId: string | number | Array<string | number>) => {
  return request({
    url: '/system/accountantEvaluate/' + evaluateAccountantId,
    method: 'delete'
  });
};
